Python Forum
Removing Space between variable and string in Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removing Space between variable and string in Python
#1
Hi Forum,

I don´t know how to remove space between variables and strings.

    print(temp_alt,"°C entsprechen",tem_neu+"°F")
between temp_alt and °C there should be no space. If I insert a + then an error occurs: TypeError: unsupported operand type(s) for +: 'int' and 'str'

Thanks!
SW
Reply


Messages In This Thread
Removing Space between variable and string in Python - by coder_sw99 - Aug-03-2021, 11:54 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python rule about the space character surrounding the equal sign ineuw 10 1,704 Sep-21-2023, 09:17 AM
Last Post: ineuw
  Replacing String Variable with a new String Name kevv11 2 808 Jul-29-2023, 12:03 PM
Last Post: snippsat
  Need help on how to include single quotes on data of variable string hani_hms 5 2,109 Jan-10-2023, 11:26 AM
Last Post: codinglearner
  python r string for variable mg24 3 2,877 Oct-28-2022, 04:19 AM
Last Post: deanhystad
  USE string data as a variable NAME rokorps 1 979 Sep-30-2022, 01:08 PM
Last Post: deanhystad
  Remove a space between a string and variable in print sie 5 1,833 Jul-27-2022, 02:36 PM
Last Post: deanhystad
  Split string using variable found in a list japo85 2 1,324 Jul-11-2022, 08:52 AM
Last Post: japo85
  Simple Python API, need packaging/removing hardcoding zxcv101 2 1,157 Jun-13-2022, 03:09 PM
Last Post: zxcv101
  Can you print a string variable to printer hammer 2 1,989 Apr-30-2022, 11:48 PM
Last Post: hammer
Question How to convert string to variable? chatguy 5 2,493 Apr-12-2022, 08:31 PM
Last Post: buran

Forum Jump:

User Panel Messages

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