Posts by DSLima90 • 111 points
2 posts
-
0
votes1
answer56
viewsA: String equivalent using variables - Python 3.x
If you just want to create the string in this format, try using the " character to escape the quotes: def equi_string(exchange,market): values = """ { "exchange_code": \""""+exchange+"""\",…
-
1
votes2
answers4433
viewsA: Typeerror: 'str' Object does not support item assignment
The problem is that you are modifying a String, which is an immutable object in python. Try to change the line: board = "__" * len(a) for: board = ["__" for _ in range(len(a))] or to: board = ["__"]…