python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
F string assignment from a different file?
I like to keep one file with just my f strings that represents SQL queries and each query needs a db name. In my python program, i will populate the db variable as I am reading out db names.
E.g.
in q...
drdot
Votes: 0
Answers: 1
How to use escape characters in python fstrings deprecated, without converting to raw string
When running
python3.10 -B -Wall testcode.py
I get the following deprecation warnings in my code which I would like to fix
DeprecationWarning: invalid escape sequence '\:'
DeprecationWarning: invalid ...

remustata
Votes: 0
Answers: 2
How to use f string to divide users input and print out only 2 decimal places?
I was trying to figure out a basic python program with f-strings. The problem was to ask user to enter any amount of ounces and then divide the ounces by 2.34. The output should only be a number with ...
Ben B
Votes: 0
Answers: 2
Problem with alligning my output (f string) Python
I am having some trouble with aligning things in my output. Down below I have copied the expected output and the output my code gives me. It is very similar, however, the numbers aren't aligned correc...

Fedra Herman
Votes: 0
Answers: 2