Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: strange class property
Post: RE: strange class property

Thanks!
KaliLinux General Coding Help 2 2,365 Nov-25-2019, 04:32 PM
    Thread: strange class property
Post: strange class property

Why does the following program output "python is hard" ? class t: def __init__(self): self.__t="python is hard" t=t() print(t._t__t)
KaliLinux General Coding Help 2 2,365 Nov-25-2019, 04:22 PM
    Thread: strange output
Post: RE: strange output

(Nov-18-2019, 08:31 PM)buran Wrote: left-hand [0] is a list with one element - 0. the right-hand [0] is indexing - you access the 0-indexed element, which is 0 to be more clear print([1][0]) will p...
KaliLinux General Coding Help 2 1,982 Nov-19-2019, 09:24 AM
    Thread: strange output
Post: strange output

Why does print([0][0]) output 0 ?
KaliLinux General Coding Help 2 1,982 Nov-18-2019, 08:28 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020