1

In C++, i could use cin.ignore() to get a keystroke from user before program continues.

What is the equivalence of cin.ignore() in python?

kaya3
  • 47,440
  • 4
  • 68
  • 97
alvas
  • 115,346
  • 109
  • 446
  • 738

1 Answers1

0

You could simply do:

raw_input("Press enter to exit...") # use input() if using Python 3.x

This only works with pressing Enter, however (the user could type in a bunch of letters but only pressing Enter at the end).

Rushy Panchal
  • 16,979
  • 16
  • 61
  • 94