There are a few ways, depending on what you are trying to do.
If you want to read tabular type data,
csvis a fine option. For saving python variables,
pickleare good, and
yamlalso read into dicts, and produce readable files. If you literally just want to store one double per line without any context, you could simply call float. Or, if you are using
formatto write each line, use
parseas the inverse of format.
For just reading/writing your own format, you can use
for line in f: my_num=float(line) #do something with my_num...
If you type from math import *, then you can use the symbols without typing math.
Or you can import specific names.
from math import pi Or from math import *
Both would expose
Means you must use
Often, it is considered bad form to use
import *, because then it can be hard to tell where some attribute or function comes from. By being explicit, your code will be easier to follow.
Usually, if you have imports that can be used in multiple functions , import at the top of the file.. if you have one import that is used in one function, and it is a big import, and the function is rarely used, then it can sometimes make sense to import inside a function.
Also-- the "Text" part of the name can be replaced with Rounded, or Display. Apparently Text is supposed to used under 19pt, Display for 20pt+. I'm not sure what Rounded is for -- looks a little more informal.
I think apple tried to obfuscate system font names so people used their new API in iOS13, to prevent people hard coding fonts that might change later. Hence reason that .SFUI doesnt work
I assume draw_string is using UIFont.fontWithName_size_