- 3

Solve this

If we gave +500,+25,+55,-25,-52,+25 How we can separate positive and negative numbers in python

30th Apr 2022, 8:17 AM
Arunesh Kishore
6 Respuestas
+ 3
Separate them means?
30th Apr 2022, 3:49 PM
A͢J
A͢J - avatar
+ 3
If you have the whole thing in a string use the split() method
30th Apr 2022, 4:50 PM
Tibor Santa
Tibor Santa - avatar
+ 2
First step: edit your question explaining what "separate" means in this context. Second step: edit your question including a link to your code in Code Playground. Third step: edit your question explaining your difficulties. This way, we'll know how to help you.
30th Apr 2022, 5:23 PM
Emerson Prado
Emerson Prado - avatar
+ 1
mehrdad nka Read about list comprehensions. They are great for this. But, first, let the OP show some effort. Having someone else solving the whole problem doesn't help to learn at all.
2nd May 2022, 12:48 AM
Emerson Prado
Emerson Prado - avatar
0
Emerson Prado , number 0, he needs to edit his question and add "please" at the beginning of his title
30th Apr 2022, 10:22 PM
Shadoff
Shadoff - avatar
0
Emerson Prado , the guy wants upvotes (as if it's an oxygen for the lungs)😁
2nd May 2022, 5:23 AM
Shadoff
Shadoff - avatar