+ 1

help answering pls

i wrote : print str("12", "2") but it shows an "syntax" error, why?

1st Nov 2018, 3:57 AM
ahmedOmani
ahmedOmani - avatar
4 Answers
+ 4
As i know, you don't need use str before print statement to define a string, you already define It when you use "" inside the parentheses. The syntax bellow you run without erros. print("12", "2")
1st Nov 2018, 4:39 AM
Luiz Santos
Luiz Santos - avatar
+ 5
print has no braces print(str("12","2")) now the str is called bad but i dont understand what u want to print.
1st Nov 2018, 5:28 AM
Oma Falk
Oma Falk - avatar
+ 3
Because it's python 3.7 now Your syntax is for python 2.x and... I'm not sure what you want to do with str("12","2")đŸ€”
1st Nov 2018, 7:09 AM
Flandre Scarlet
Flandre Scarlet - avatar
0
Thank you Flandre Scarlet and all of you, I just wanted to try to use it and see if it works on python 3.7, i didn't know that 3.7 is this different from 2.x
15th Nov 2018, 7:45 AM
ahmedOmani
ahmedOmani - avatar