Python Forum
[split] Problem with integers and strings
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Problem with integers and strings
#1
Please help!
I very new to python and need to understand why I'm getting this error message for this output.
Traceback (most recent call last):
File "/Users/aka2d7/Documents/Output ex.py", line 24, in <module>
print(city, "is currently", description, "and temperature is", temperature + "F")
TypeError: unsupported operand type(s) for +: 'int' and 'str'

I can run it and it will work up until the (+) plus sign and the "F". What does this error message mean?

Thanks,
aka2d7
Reply


Messages In This Thread
[split] Problem with integers and strings - by aka2d7 - Jan-04-2018, 11:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand strings and lists of strings Konstantin23 2 822 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  problem in using int() with a list of strings akbarza 4 789 Jul-19-2023, 06:46 PM
Last Post: deanhystad
  Splitting strings in list of strings jesse68 3 1,829 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  Reading integers from a file; the problem may be the newline characters JRWoodwardMSW 2 2,022 Jul-14-2020, 02:27 AM
Last Post: bowlofred
  Problem with replacing strings donnertrud 3 2,176 May-22-2020, 04:06 PM
Last Post: donnertrud
  [split] Python Class Problem astral_travel 12 5,091 Apr-29-2020, 07:13 PM
Last Post: michael1789
  Split a long string into other strings with no delimiters/characters krewlaz 4 2,836 Nov-15-2019, 02:48 PM
Last Post: ichabod801
  problem with for loop using integers python_germ 5 3,073 Aug-31-2019, 11:42 AM
Last Post: jefsummers
  re.split multiple delimiters problem gw1500se 2 3,662 Jun-24-2019, 02:43 PM
Last Post: gw1500se
  Finding multiple strings between the two same strings Slither 1 2,557 Jun-05-2019, 09:02 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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