Posts by Cleomir Santos • 117 points
6 posts
-
0
votes3
answers9117
viewsQ: convert a string list into a list of integer numbers
x = ['443' , '552' , '342' , '368' , '9867' , '335' , '9412' , '7436' , '1692' , '85' , '990' , '332' , '8816' , '4567' , '279' , '119' , '2290' , '234' , '9863' , '345' , '230' , '5574' , '230' ,…
-
0
votes1
answer57
viewsQ: Remove index spaces in a list
In the list below, I want to print only the gender of each index, which, in fact, I can, but as you can notice there are 4 lists that are without definition of gender, which causes, when printing…
-
1
votes2
answers77
viewsQ: Return pieces of an eternal
Implement a generator function, chunker, which takes an iterable and returns a specific piece of size at a time. Resorting to the function like this: for chunk in chunker(range(25), 4):…
-
3
votes1
answer67
viewsQ: Doubt: Function of generators
Write your own generator function which works as the internal enumerate function. Using the function thus: lessons = ["Why Python Programming", "Data Types and Operators", "Control Flow",…
-
-2
votes1
answer74
viewsQ: Method to return string from an integer value
I have a function meses_dias that receives an argument, a whole number of days, and returns a string that says how many weeks and days that number represents. For example, meses_dias(10) must return…
-
5
votes2
answers2728
viewsQ: How to separate only the first word of each string from a list?
Given that list : nomes = [ " Paulo Ricardo " , " Fabio Junior " , " Roberto Carlos " ] How do I create a new list, separating the last name from the last name and only adding the last name without…