decoding

Convert octal representation of UTF-8

Convert octal representation of UTF-8 Question: I have a variable like this: >>> s = ‘\320\227\320\264\320\260\320\275\320\270\320\265 \320\261\321\213\320\262\321\210\320\265\320\271’ >>> print(s) 320227320264320260320275320270320265 320261321213320262321210320265320271 This contains the octal escape representations of the UTF-8 encoding of the string “Зданиебывшей” (octal 320 227 = hex D0 97 = UTF-8 for “З”). How can I decode this string to “Зданиебывшей”? Asked …

Total answers: 1

Request returns bytes and I'm failing to decode them

Request returns bytes and I'm failing to decode them Question: Essentially I made a request to a website and got a byte response back: b'[{“geonameId:”703448”}……….’. I’m confused because although it is of type byte, it is very human readable and appears like a list of json. I do know that the response is encoded in …

Total answers: 4

Python Caesar Cipher Decoder

Python Caesar Cipher Decoder Question: In my lesson I was tasked with creating a Caesar Cipher decoder that takes a string of input and finds the best possible string using a letter frequencies. If not sure how much sense that made but let post the question: Write a program which does the following. First, it …

Total answers: 5