12. Write a python program to generate a function to combine different integer into one integer without undergoing normal mathematics operation.
The output is:
Integer list: [2, 8, 32, 6, 5]
Expected Answer:
The integers [2, 8, 32, 6, 5] are combined into: 283265
Sample Answer:
def combine_digits(integers): result= '' for i in integers: result += str(i) return result print("The integers [2, 8, 32, 6, 5] are combined into:", combine_digits([2, 8, 32, 6, 5]))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)