Don't see the problem here as mention bye @deanhystad so do dictionary or any data collection show the
That's because dictionaries are not
Usually for end-user there is
If want to show dictionary for some reason that i don't see why,can make rebuild output it with
Don't use
repr()
values.That's because dictionaries are not
end-user
representable data structures,more like debug friendly for developers. Usually for end-user there is
print()
of data and then is show \python
.If want to show dictionary for some reason that i don't see why,can make rebuild output it with
print()
.Don't use
dict
as a variable name as it's a reserved word in Python.>>> my_dict = {'name': '\python'} >>> my_dict {'name': '\\python'} >>> print(''.join(f'{{"{k}": "{v}"}}' for k,v in my_dict.items())) {"name": "\python"}