0

How to add comment in python?

I recently learned it, but I am back after a long break. Please help me. I am taking notes on "or" and "and" in Python, but getting confused. Would you don't mind if I ask this?

4th Nov 2025, 11:52 AM
ChirantanChitte011
3 Answers
+ 2
With a #
4th Nov 2025, 3:49 PM
Roman Koerdt
Roman Koerdt - avatar
+ 1
HTML uses a unique bracketed syntax. <!-- ... --> CSS only uses the multi-line style, /* ... */. Most languages like JavaScript and the C-style backend languages use both // single comment and /* ... */ for multiple comments Python and Ruby primarily use the pound sign (#) for single comments. Ruby is unique with its explicit =begin ... =end block for multi-line comments.
4th Nov 2025, 8:16 PM
BroFar
BroFar - avatar
0
# py comment in single line ''' py comment in multi lines ''' ''' True and True —> True True and False —> False False and False —> False True or True —> True True or False —> True False or False —> False ''' # Logic operator and print(5 > 2 and 6 > 3) # Output: True print(4 > 2 and 1 > 2 ) # Output: False print(7 > 9 and 8 > 10) # Output: False print() # Logic operator or print( 0 < 3 or 8 > 2) #Output: True print( 1 < 7 or 5 > 10) # Output: True print( 6 > 9 or 4 > 8) # Output: False
4th Nov 2025, 10:30 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar