0
Converting ASCII values back to words with python
3 Respostas
+ 6
chr() function may be what you need, but you should explain better what you are trying to, possibly attach your code.
+ 1
Thank you for the snippet, I'll kindly do so
0
Here is an example Python code that converts ASCII values back to words I attached below. Mentor sir already mentioned before. I just help you to give you a snippet.
When you run this code, it will output:
```
Hello World
```
The code uses a list comprehension to convert each ASCII value in the list `ascii_values` to its corresponding character using the `chr()` function. The `chr()` function takes an ASCII value and returns the character corresponding to that value.
Then `" ".join()` function is used to join all the characters together to form a single string and assigned to the variable `word`. Finally, the code prints out the `word`, which represents the string "Hello World" by converting the ASCII values back to characters and joining them together.
https://sololearn.com/compiler-playground/cLPG5gHFHzXF/?ref=app