1

I have a simple question :

country = input_data['pays']

I it could happen that 'pays' does not exist. Is it possible to put a default value, so that it dont raise that error :

Traceback (most recent call last): File "/tmp/tmpe5kIHr/usercode.py", line 12, in the_function country = input_data['pays'] KeyError: 'pays'

Xantium
  • 10,258
  • 9
  • 56
  • 83
remc
  • 131
  • 1
  • 9

0 Answers0