пайтонлиб лого пайтонлиб солнце питон либ цветок ProgerLib Python For Everyone
  • Trainer
    Trainer Community Tasks Add Task Tests
  • Exercises
    Find the Error What Will It Output
  • Theory
  • Languages
  • Compiler
  • More
    Blog Libraries News Books Forum
  • English flag EN
    Russian flag RU
    Spanish flag ES
    Chinese flag ZH
    French flag FR
    German flag DE
    Portuguese flag PT
    Arabic flag AR
    Hindi flag HI
  • Trainer
  • Community Tasks
  • Add Task
  • Tests
  • Theory
  • Find the Error
  • What Will It Output
  • Blog
  • Libraries
  • Books
  • Forum
  • Compiler
  • English flag EN
    Russian flag RU
    Spanish flag ES
    Chinese flag ZH
    French flag FR
    German flag DE
    Portuguese flag PT
    Arabic flag AR
    Hindi flag HI
питон либ луна питонлиб солнце pythonlib цветок

Change theme

Login Register
Home › Forum › Split list elements character by character
Avatar question@mail.ru ·

Split list elements character by character

📁 список

Hello!

Please tell me how to split a conditional list ['1', '22', '333'] by characters, i.e. to get a list ['1', '2', '2', '3', '3', '3']

Thanks in advance!

1 responses
Avatar answer@mail.ru ·

Analog in Python 3.6+:

def toFixed(numObj, digits=0):    retu f""{numObj:.{digits}f}""

Example:

>>> numObj = 12345.6789>>> toFixed(numObj)'12346'>>> toFixed(numObj, 1)'12345.7'>>> toFixed(numObj, 6)'12345.678900'>>> toFixed(

Log in to leave an answer

Blogs

Docker and JavaScript: Containerizing Node.js Applications

Docker and JavaScript: Containerizing Node.js Applications

WebSocket in C#: Advanced Level Real-Time Applications

WebSocket in C#: Advanced Level Real-Time Applications

Monitoring and Logging in Rust: From Chaos to Order

Monitoring and Logging in Rust: From Chaos to Order

Cannot convert interface{} to string: how to tame generics in Go

Cannot convert interface{} to string: how to tame generics in Go

Serverless Functions in PHP: AWS Lambda from A to Z

Serverless Functions in PHP: AWS Lambda from A to Z

Latest

Avatar
Python self-motion code
0 responses
Avatar
MTS Tech Arena
0 responses
Avatar alex_dev11
Iterating over std::vector: unsigned vs signed index — which to choose?
0 responses
Avatar js_student13
Error in Rust: "expected a literal" when using println! — how to fix?
0 responses
Avatar byte_coder98
ESLint error: Cannot read file '.../tsconfig.json' — how to fix?
0 responses

Similar

Avatar question@mail.ru
Split a number into a list of digits
Avatar question@mail.ru
How to split all integers in an array into individual digits?
Avatar question@mail.ru
Load the number of numbers
Avatar question@mail.ru
How to divide all integers in the array into separate categories?
Avatar question@mail.ru
Drop-down list in Django