fork download
  1. casas = {
  2. 'SÃO PAULO':' 12.396,372',
  3. 'RIO DE JANEIRO':'6.775,561',
  4. }
  5.  
  6. def lugares2(c):
  7. return casas.get(str.upper(c), 'Desconhecido')
  8.  
  9. print(lugares2('rio De JaNeIrO'))
Success #stdin #stdout 0.03s 9632KB
stdin
Standard input is empty
stdout
6.775,561