Question: Write a function select_strings(ArrayList strings) that returns an ArrayList of strings, containing every string in strings that has at least one numerical digit in its
Write a function select_strings(ArrayList
IMPORTANT: MAKE SURE THAT YOUR FUNCTION RETURNS AN ARRAY LIST, NOT AN ARRAY.
For example:
If a1 = [hello, 123, az7, az], then select_strings(a1) returns array list [123,
az7], because 123 and az7 are the only strings in a1 that contain a numerical digit.
If a1 = [{hello, az], then select_strings(a1) returns the empty array list [ ], because
none of the strings in a1 contains a numerical digit.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
