The Python Oracle

What's the meaning of "(1,) == 1," in Python?

This video explains
What's the meaning of "(1,) == 1," in Python?

--

Become part of the top 3% of the developers by applying to Toptal
https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Cosmic Puzzle

--

Chapters
00:00 Question
00:40 Accepted answer (Score 90)
01:24 Answer 2 (Score 157)
01:53 Answer 3 (Score 13)
02:20 Thank you

--

Full question
https://stackoverflow.com/questions/3731...

Question links:
[Python tuple trailing comma syntax rule]: https://stackoverflow.com/questions/7992...

Accepted answer links:
[here]: https://docs.python.org/3/reference/expr...
[ast]: https://docs.python.org/3/library/ast.ht...
[as Tim Peters explained]: https://stackoverflow.com/a/37313506/674...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #tuples #equalsoperator

#avk47