Skip to content

Commit 59bb29b

Browse files
committed
Solved ruff check in str_to_num.py
1 parent 8e680fc commit 59bb29b

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

strings/string_to_num.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* Indian system uses crore, lakh, thousand and not million and billions
55
66
For the part after the decimal example ( .159 ):
7-
* Digit by digit ( .159 ) -> point one five nine is allowed anything else will throw an error
7+
* Digit by digit ( .159 ) -> point one five nine is allowed
8+
* Anything else will throw an error
89
910
>>> to_int("Five")
1011
5
@@ -16,9 +17,14 @@
1617
>>> to_float("One thousand five hundred and two")
1718
1502.0
1819
19-
>>> to_int("Ninety nine crore three lakh seventy two thousand and six point one five nine")
20+
>>> to_int(
21+
... "Ninety nine crore three lakh seventy two thousand and six point one five nine"
22+
... )
2023
990372006
21-
>>> to_float("Ninety nine crore three lakh seventy two thousand and six point one five nine")
24+
25+
>>> to_float(
26+
... "Ninety nine crore three lakh seventy two thousand and six point one five nine"
27+
... )
2228
990372006.159
2329
2430
wikipedia explanation - https://en.wikipedia.org/wiki/Numeral_(linguistics)

0 commit comments

Comments
 (0)