Creating classes and tkinter GUI - Python Discussions
Nov 26, 2023 ... Hi,. as the error states, 'Persona' class has no attributes '.get()'. If you want to get the information for the class attributes, ...
Nov 26, 2023 ... Hi,. as the error states, 'Persona' class has no attributes '.get()'. If you want to get the information for the class attributes, ...
This will not do what you want, because str(type_n) means the same string every time as you .replace each item. Unlike .append on a list, .replace on a string creates a new string and does not change the original string object (there are no methods for changing a string in-place).
It would be easier to write well-perfoming code when you could easily find this information. It would help you come up with time and space complexity numbers for your own code (for example when interviewing, or for school assignments).
But I’ve never seen anyway to represent a value in hex in a Python string so I can use the .replace() function. This is what I’ve tried: def cleanhtmllist(mylist): r'''Change extended ascii to normal characters.
Syntax of the method: str.replace(old, new, count=-1). What if replace could accept two lists instead of two strings. Often I find in code: text.replace(a, b).replace(c, d).