Formatted input function

candide candide at free.invalid
Sat Sep 5 12:13:30 CEST 2009

I have a text file and the first line provides the best score of a game. This
line has  the following format :

Best score : 42

In order to update the score, I try to retrieve the score value.

In C, we would manage this with the following statement :

fscanf(foo_file, "Best score : %d", &score);

Does Python provide an equivalent ?

More information about the Python-list mailing list