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
  • 11,201
  • 10
  • 62
  • 89
remc
  • 161
  • 1
  • 2
  • 10

0 Answers0