Print("%s-%s"%(1,[2,3]) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Print("%s-%s"%(1,[2,3])

how to solve that, please help me

3rd Mar 2019, 4:36 AM
Himasha Rasangi
Himasha Rasangi - avatar
2 Answers
+ 6
print("%s - %s" % (1, [2, 3])) print(f"{1} - {[2, 3]}") print("{} - {}".format(1, [2, 3])) print("1 - [2, 3]") all output the same result (as a string) 1 - [2, 3] as Diego pointed out, print must start with lower case p and the parentheses must match, i.e. ( ()) Just keep on with the Python course and this will all make sense. 😊
3rd Mar 2019, 5:29 AM
David Ashton
David Ashton - avatar
+ 2
print("%s-%s"%(1,[2,3]))
3rd Mar 2019, 4:56 AM
Diego
Diego - avatar