0
Can we write either double quote or single quote within the print function
3 Réponses
+ 10
Yes, but you have to be consistent and use the same type at the beginning and at the end.
0
Yes, you can use both.
You can even use triple double quote or triple single quote.
But you have to consider the beginning and the end must be the same.
Example:
print('Hello World!')
print("Hello World2!")
print('''Hello
World3
!''')
print("""
Hello
World4!""")
0
No problem either one