##### Mathematical Operators in String
 Mathematical Operators in String AgileAVS Programmer named Tim Posts: 16 Threads: 13 Joined: Feb 2020 Reputation: 0 Mar-04-2020, 12:41 PM Hey this is a very simple question, how do I use mathematical numbers in text such as 1,000.00 and 9,000.00. For example: ```x=float(1,000.00) y=float(19,000.00) print(x*y)`````````Error:Traceback (most recent call last): File "C:\Users\aabha\OneDrive\Desktop\py4e\rough.py", line 1, in x=float(1,000.00) TypeError: float expected at most 1 arguments, got 2`````` Reply Posts: 2,813 Threads: 34 Joined: Jan 2018 Reputation: 256 Mar-04-2020, 04:14 PM Starting with python 3.6, one can use underscores in numeric literals. Commas are not supported. Reply

 Possibly Related Threads… Thread Author Replies Views Last Post Magic Method Arithmetic Operators ClownPrinceOfCrime 3 122 Jan-10-2021, 03:24 PM Last Post: ndc85430 About mathematical equations seyidcemkarakas 3 262 Oct-04-2020, 01:21 PM Last Post: Gribouillis Recognising mathematical expressions from word and pdf file Preeti15 0 289 Aug-19-2020, 09:06 AM Last Post: Preeti15 Mathematical Conversion Scripts for Weather Station Mickey53usa 11 1,052 Jun-24-2020, 03:14 AM Last Post: buran Class and Operators in Python rsherry8 1 434 May-27-2020, 07:09 PM Last Post: buran Trying Comparison Operators PythonGainz 3 642 Mar-28-2020, 10:46 AM Last Post: PythonGainz A doubt with 'in' and 'not in' operators with strings newbieAuggie2019 7 806 Oct-23-2019, 03:11 PM Last Post: perfringo Mathematical function input Tiiill 2 612 Sep-10-2019, 09:25 PM Last Post: nilamo understanding exponential and bitwise operators srm 1 696 Jun-15-2019, 11:14 AM Last Post: ThomasL please help with this question about using operators to multiply a string? GilesTwigg 3 1,458 Feb-27-2019, 04:13 PM Last Post: ichabod801

Forum Jump:

### User Panel Messages

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