title: How to avoid hard coding in if condition of python script
body: <p>I am new to python. I have query regarding un-hardcoding object names(if condition) in python script. 
  I have fruit = [ Apple, Mango, Pineapple, Banana, Oranges]
  and size = [ small,  medium , big] 
  Currently I write code as below: </p>
  
  <pre><code>if (fruit == apple, size == small): 
     statement 1
     statement 2
  elif (fruit == apple, size == medium):
     statement 1
     statement 2
  elif (fruit == apple, size == big):
     statement 1
     statement 2
  elif (fruit == Mango, size == small):
     statement 1
     statement 2
  elif (fruit == Mango, size = medium):
     statement 1
     statement 2
  </code></pre>
  
  <p>How can I avoid writing multiple if...else conditions? </p>
  
  <p>Statement 1: Pulling up a dot file related to fruit and size from directory 
  The path structure is
  main-directory/fruit/collateral/fruit_size.dot 
  statement 2: Pulling up a txt file related to fruit and size from directory
  The path structure is
  main-directory/source/readparamters/readparam/fruit_size.txt </p>
  
  <p>I want to execute statements for each condition one at a time. Currently I take inputs for fruit and size from user. Is there a way in python that the script can automatically take combinations one by one and execute statements? I know it's somewhat complex and python expert can help me. </p>