Python Forum
How to convert "str" to "int"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to convert "str" to "int"
#13
colt Wrote:There isn't a way to make it work with both versions?
Yes there is
import sys
if sys.version_info < (3,):
    spam = ord(spam)
Reply


Messages In This Thread
How to convert "str" to "int" - by colt - Oct-06-2019, 01:57 AM
RE: How to convert "str" to "int" - by scidam - Oct-06-2019, 05:25 AM
RE: How to convert "str" to "int" - by Gribouillis - Oct-06-2019, 06:38 AM
RE: How to convert "str" to "int" - by colt - Oct-08-2019, 11:13 PM
RE: How to convert "str" to "int" - by Gribouillis - Oct-09-2019, 05:51 AM
RE: How to convert "str" to "int" - by colt - Oct-09-2019, 05:40 PM
RE: How to convert "str" to "int" - by Gribouillis - Oct-09-2019, 05:59 PM
RE: How to convert "str" to "int" - by colt - Oct-12-2019, 09:55 PM
RE: How to convert "str" to "int" - by Gribouillis - Oct-12-2019, 10:39 PM
RE: How to convert "str" to "int" - by colt - Oct-15-2019, 03:17 PM
RE: How to convert "str" to "int" - by Gribouillis - Oct-15-2019, 03:45 PM
RE: How to convert "str" to "int" - by colt - Oct-15-2019, 11:40 PM
RE: How to convert "str" to "int" - by Gribouillis - Oct-16-2019, 06:14 AM

Forum Jump:

User Panel Messages

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