I am using thonny now but I wanted to know in general that can I comment in between a line of code in python
from tkinter import *
root=Tk()
mybutton=Button(root,text="click Help",state=DISABLED,padx=60,pady=55)
mybutton.pack()
root.mainloop()
I wanted to comment state=disabled here but not the entire line. So can I do it or I have to write a new line for it. :)
You can put the arguments on multiple lines, then comment the one you don't want:
from tkinter import *
root=Tk()
mybutton = Button(
root,
text="click Help",
#state=DISABLED,
padx=60,
pady=55
)
mybutton.pack()
root.mainloop()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With