Question: Write a Python function listFirstDigits() that takes a list of positive integer numbers as parameter, returns a new list made of the first digits of

Write a Python function listFirstDigits() that takes a list of positive integer numbers as parameter, returns a new list made of the first digits of the numbers in the list. Example: If the parameter list contains [44, 800, 7, 24], the function will return [4, 8, 7, 2]. Hint: The first digit of a number can be obtained by converting the number to string, then getting the first character, then by converting this character to integer.(PYTHON)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!