-1

I have following input:

{
  "symbol": "AAPL",
  "exchange": "NASDAQ",
  "exchangeSuffix": null,
  "exchangeDescription": "Nasdaq All Markets",
  "name": "Apple Inc"
}

When I paste it and print it, I get only { printed. Since raw_input is now input in Python 3.x, I tried to use from six.moves import input but it didn't help. So the input is somehow cut off.

My final goal is to remove

  "exchange": "NASDAQ",
  "exchangeSuffix": null,
  "exchangeDescription": "Nasdaq All Markets"

and print the rest.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Nothere
  • 23
  • 1
  • 6
  • If you're pasting that into the terminal, the new line after `{` is interpreted, like hitting Enter, as the end of the input. See e.g. https://stackoverflow.com/q/11664443/3001761, you'll need to loop until what _you_ consider to be the end. Or read from a file, remove the newlines _before_ pasting, ... – jonrsharpe Aug 17 '21 at 10:06
  • If you NEED to enter it as input then you have to enter it as a single line. I am assuming though this is output from an API which you could read directly from your script rather than entering as input – SimonT Aug 17 '21 at 10:08
  • How do I enter it as a single line? It's available via API. What I try to use as input is a search result which is offered in a free version. – Nothere Aug 17 '21 at 10:25

1 Answers1

0

there is no need of importing input it is already imported in the file.I am not able to understand ur question properly

  • it's not a file. It is only in clipboard as it is info from a website. Any idea how to solve that problem? – Nothere Aug 17 '21 at 11:02