title: How do i call a function that requires an argument on key press? Python
body: <p>I am a beginner programmer, sorry if the answer is obvious. Any help is appreciated.
  I am currently using <code>WIN.onkeypress()</code> to call functions but my <code>scroll_draw_col</code> function requires the argument <code>curr_draw_col</code>. I know <code>WIN.onkeypress()</code> can't pass arguments to their function. How do I call the <code>scroll_draw_col</code> function with <code>curr_draw_col</code> as an argument on keypress (&quot;f&quot;)?</p>
  <pre><code>def scroll_draw_col(curr_draw_col):
      curr_draw_col += 1
  
  
  WIN.listen()
  WIN.onkeypress(tri_fwd, 'Up')  # Unrelated
  WIN.onkeypress(tri_bkw, 'Down')  # Unrelated
  
  WIN.onkeypress(tri_left, 'Left')  # Unrelated
  WIN.onkeypress(tri_right, 'Right')  # Unrelated
  
  WIN.onkeypress(scroll_draw_col, 'f')  # &lt;-----
  
  while True:
      WIN.update()
      dra.goto(tri.xcor(), tri.ycor())  # Unrelated
      print(curr_draw_col)  # To see if curr_draw_col is being incremented by 1 
  </code></pre>