Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Casting from str to int
#3
Thanks buran

But where do I put this in my code? I have tried putting it in several places but get a type error like the one below:

Traceback (most recent call last):
File "C:/Users/aaron/PycharmProjects/assessment_two/marks.py", line 9, in <module>
marksList = int[mark1, mark2, mark3, mark4, mark5]
TypeError: 'type' object is not subscriptable

Thanks,
Aaron
Reply


Messages In This Thread
Casting from str to int - by aztrav - Oct-13-2020, 05:20 AM
RE: Casting from str to int - by buran - Oct-13-2020, 05:27 AM
RE: Casting from str to int - by aztrav - Oct-13-2020, 06:09 AM
RE: Casting from str to int - by aztrav - Oct-13-2020, 06:17 AM
RE: Casting from str to int - by perfringo - Oct-13-2020, 09:10 AM

Forum Jump:

User Panel Messages

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