Would it be useful if Round worked on strings in lists?
|
08-18-2019, 05:28 PM
(This post was last modified: 08-18-2019 05:37 PM by StephenG1CMZ.)
Post: #1
|
|||
|
|||
Would it be useful if Round worked on strings in lists?
Whilst debugging, I sometimes find it useful to output a rounded list of numbers.
The good thing is that Round works on lists as well as numbers, so you don't need to round every item in the list. Unfortunately, Round doesn't work with strings. Code: Would it be nice if the strings were ignored rather than generate an error? Or would that break something? Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
08-18-2019, 06:05 PM
Post: #2
|
|||
|
|||
RE: Would it be useful if Round worked on strings in lists?
(08-18-2019 05:28 PM)StephenG1CMZ Wrote: Whilst debugging, I sometimes find it useful to output a rounded list of numbers. Rounding strings would certainly be unusual. Couldn't you just do something like Code: |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)