0

In python when i run this code

calories = 565
print('\'calories\':', calories )

returns

("'calories':", 565)

but i want to print without the parenthesis and quotes, how can i do this

Runner Bean
  • 4,895
  • 12
  • 40
  • 60
  • 3
    Sounds like you're using Python 2. In Python 2 you can just write `print "'calories':", calories` without any parentheses. – khelwood Sep 11 '19 at 07:52
  • 3
    Or better, switch to python3 right now :-) – Demi-Lune Sep 11 '19 at 07:54
  • You are probably using python 2. Either switch to python 3 or write `from __future__ import print_function`. This will allow you to use the python 3 print function in python 2 – Alve Sep 11 '19 at 07:59

0 Answers0