Modify the code instead of using join

numeric_list = []
invalidkeys_list = []
odd_values = []
even_values = []            
positive_values = []
negative_values = []
total = 0

# Reading input from the user.
user_input = input("Please enter a value in the list or press ‘q’ to quit: ")

# Checking for user input either number or character and adding them to corresponding lists.
while user_input!= 'q':
    if user_input.lstrip('-+').isdigit():
        numeric_list.append(int(user_input))
        user_input = input("Please enter a value in the list or press ‘q’ to quit: ")
    else:
        invalidkeys_list.append(user_input)
        user_input = input("Invalid key pressed, enter a value in the list or press ‘q’ to quit: ")
    
    
# 1. Lists all the elements in the list and display it.
list1 = [str(num) for num in numeric_list]  # Converting integers to string
list1_result = ", ".join(list1)             # joining the string elements separated by comma
print(f"\nElements you entered in the list are: {list1_result}")

# 2. Lists all the odd values in the list.
for num in numeric_list:
    if num%2 == 1:
        odd_values.append(num)
odd_nums = [str(num) for num in odd_values]
odd_result = ", ".join(odd_nums)
print(f"Odd values in the list are: {odd_result}")

# 3. Lists all the even values in the list.
for num in numeric_list:
    if num % 2 == 0:
        even_values.append(num)
even_nums = [str(num) for num in even_values]
even_result = ", ".join(even_nums)
print(f"Even values in the list are: {even_result}") 
        
# 4. Calculates and outputs the ‘average’ value of the list.
for num in numeric_list:
    total = total + num  
average = total / len(numeric_list)
if (average > 0) & (average <= 9):
    avg = round(average, 3)
    print(f"The average List value is: +00{avg}")
elif (average >= 10) & (average <= 99):
    avg = round(average, 3)
    print(f"The average List value is: +0{avg}")
elif (average < 0) & (average <= -9):
    avg = round(average, 3)
    print(f"The average List value is: -00{avg}")
elif (average <= -10) & (average >= -99):
    avg = round(average, 3)
    print(f"The average List value is: -0{avg}")
else:
    print("The average List value is: 0")

# 5. Outputs all the ‘Invalid’ keys pressed, (i.e., a, b, d, k, %, *, etc. )
invalid_keys = [str(num) for num in invalidkeys_list]
invalidkeys_result = ", ".join(invalid_keys)
print(f"Invalid keys pressed are: {invalidkeys_result}")

# 6. Checks how many elements stored in the list are positive and negative.
for num in numeric_list:
    if num >= 0:
        positive_values.append(num)
    else:
        negative_values.append(num) 

pos_nums = [str(num) for num in positive_values]
pos_result = ", ".join(pos_nums) 
neg_nums = [str(num) for num in negative_values]
neg_result = ", ".join(neg_nums) 

print(f"{len(positive_values)} element(s) are positive. They are {pos_result}. {len(negative_values)} element(s) are negative. They are {neg_result}")              

# 7. Remove any occurrences of a value from the list.
input1 = input("\nWould you like to remove any occurrences of a value from the list – enter ‘q’ to quit: ")
while input1 != 'q':
    if (input1.lstrip('-+').isdigit()):
        input1 = int(input1)
        if input1 in numeric_list:
            numeric_list.remove(input1)
            print("Modified list is: ", numeric_list)        
        else:
            print("Not found")
    input1 = input("\nWould you like to remove any occurrences of a value from the list – enter ‘q’ to quit: ")
    
print("GOOD BYE!")