What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-18 06:10:28
TypeError: unsupported operand type(s) for +: 'int' and 'str'
#this is a int Anmol = 1 #this is a str Mom = "1" Anmol + Mom #if you add you get someting that looks like this #TypeError: unsupported operand type(s) for -: 'str' and 'int' #to fix do the following Anmol + str(Mom) Add solution -
Other 2022-02-11 16:00:18
TypeError: unsupported operand type(s) for -: 'str' and 'int'
#this is a int Anmol = 1 #this is a str Mom = "1" Anmol + Mom #if you add you get someting that looks like this #TypeError: unsupported operand type(s) for -: 'str' and 'int' #to fix do the following Anmol + str(Mom) Add solution -
Python 2021-11-16 01:21:12
unsupported operand type(s) for -: 'str' and 'str'
# Error: TypeError: unsupported operand type(s) for /: 'str' and 'str' # Solution: # You're probably mixing strings and integers. Make sure to either # convert integers to strings with str(int) or strings to integers/floats # with int(string) or flo... Add solution -
Python 2021-10-30 00:42:09
python operator overloading deal with type
def __add__(self, other): if isinstance(other, self.__class__): return self.x + other.x elif isinstance(other, int): return self.x + other else: raise TypeError("unsupported operand type(s) for +: '{}' and '{}'&quo... Add solution -
Python 2021-09-29 21:56:08
TypeError: unsupported operand type(s) for +=: 'IntVar' and 'int'
#this is a int Anmol = 1 #this is a str Mom = "1" Anmol + Mom #if you add you get someting that looks like this #TypeError: unsupported operand type(s) for -: 'str' and 'int' #to fix do the following Anmol + str(Mom) Add solution
Best helpers
Cali
+5
Veirtimid
+5
Anon8889
+5
Panky1986
+5
Sardathrion
+5
G987
+5
Nuria
+5
Tony Ong
+5
Mike Adams
+5
Ender
+5
Shachna
+5
PoundingRain
+5
Alexingohr
+5
Zhengyue
+5
Shahar Tene
+5
Kang
+5
Altexpape
+5
Aung68618
+5
Anita Gould
+5