I am very new at coding so sorry if my code bellow annoys you lol but I was wondering if there is any way to include more than 1 argument in the raw_input() function so that I wouldn't have to do
print("Do you want to filter numbers greater or lower that ", filt, "?")
gorl = raw_input()
rather than just
gorl = raw_input("Do you want to filter numbers greater or lower than ",
filt, "?")
my entire code is
import random
import sys
import os
filt = int(raw_input("What number do you want your results to be filtered
by?"))
gorl = raw_input("Do you want to filter numbers greater or lower than ",
filt, "?")
ammvar = int(raw_input("How many variables do you want to filter?"))
var_list = []
varnum = 1
while ammvar > 0:
var_list.append(int(raw_input("Variable ", varnum, ":")))
varnum + 1
ammvar - 1
and this is what eclipse returns when I run it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What number do you want your results to be filtered by?10
Do you want it to be filtered greater or lower?greater
How many variables do you want to filter?7
Traceback (most recent call last):
File "C:\Users\D\workspace\Simple\Sorter__init__.py", line 16, in
var_list.append(int(raw_input("Variable ", varnum, ":")))
TypeError: raw_input() takes at most 1 argument (3 given) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~