Python Forum
Noobie Python TypeError question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noobie Python TypeError question
#2
Your first assignment looks like you want a list with two elements. If so, it should look like below:

x = ['6048922', '334318']
The construction list['6048922', '334318'] is actually interpreted as a type hinting signature, almost certainly not what is intended. (Prior to python 3.9, this would have thrown a syntax error).
zoid likes this post
Reply


Messages In This Thread
Noobie Python TypeError question - by zoid - Aug-30-2021, 05:12 PM
RE: Noobie Python TypeError question - by bowlofred - Aug-30-2021, 05:21 PM
RE: Noobie Python TypeError question - by ibreeden - Aug-30-2021, 05:27 PM
RE: Noobie Python TypeError question - by zoid - Sep-01-2021, 02:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Newbie Question re "TypeError: '<' not supported between instances of 'list' and 'int sr12 8 13,324 Apr-11-2019, 08:19 PM
Last Post: sr12
  Noobie Question, Libreries on Intellij donjon 2 3,128 Dec-16-2017, 01:59 PM
Last Post: Larz60+
  Noobie - IF and Else statement help Jedi 3 4,066 Mar-19-2017, 03:20 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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