DEV Community

Cover image for Strings to Numbers Function
Scott Gordon
Scott Gordon

Posted on

Strings to Numbers Function

#   This program converts a list of strings which are numbers and converts
#   them to numbers.
# by: Scott Gordon

def main():
    string_numbers = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
    numbers = []

    def to_numbers(array):
        """Takes a list of string numbers and converts them to integers."""
        for item in array:
        return numbers


Enter fullscreen mode Exit fullscreen mode

Photo by Chris Ried on Unsplash

Top comments (0)