Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 #python .... Need to develop a if condition from two lists
I need to solve a problem could anyone help me with the same. Below is the detailed description of my problem
I have two list , lets says
list2 = ['a2','b2,'c2']
I need to develop a if condition using these two list with 'and' and 'or' condition just like below :
if((data1 =='a1' and data2=='a2') or (data1 == 'b1' and data2=='b2') or (data1 =='c1' and data2=='c2')):
Could you help me with how to form the same without hardcoding the values
What have you tried? We are not big on writing code for people here, especially not in the Homework section. But we are big on helping people fix code that isn't working.
Craig "Ichabod" O'Brien -
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures

You might want to look at the zip() function.
ichabod801 likes this post
I am trying to help you, really, even if it doesn't always seem that way

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)