-2

This is a pretty cool code except for raw_input isn't receiving too much input i want to receive input like 5000 chars help any ideas please quick

 import re
    test_cases =  int(raw_input(""))
    input_lens = raw_input("")
    i = 0
    for i in range(0,test_cases+1):
        user_input = raw_input("")
        user_input = re.findall("\d*",user_input)
        count = 0
        for item in user_input:
            if item.isdigit():
                count += 1
        print count
        i += 1
Yossef Nagy
  • 409
  • 1
  • 7
  • 12
  • 2
    Welcome to StackOverflow. Please read and follow the posting guidelines in the help documentation. [Minimal, complete, verifiable example](http://stackoverflow.com/help/mcve) applies here. We cannot effectively help you until you post your MCVE code and accurately describe the problem. We should be able to paste your posted code into a text file and reproduce the problem you described. – Prune May 17 '17 at 23:37
  • 2
    Also, please note that this is *not* a time-critical consulting service. If you have an immediate need, perhaps you should go to a more active Q&A site; SO is built as a solutions archive. – Prune May 17 '17 at 23:38
  • 1
    Finally, please describe your problem as outlined in the posting guidelines: input you gave, result, result you want, and progress in your debugging work. – Prune May 17 '17 at 23:39
  • 4
    perhaps you are wanting to use `sys.stdin.read()` which will read until EOF ... `raw_input` will only read until a linebreak is encountered – Joran Beasley May 17 '17 at 23:40

1 Answers1

0

As from the docs for raw_input() at https://docs.python.org/2/library/functions.html#raw_input

The function then reads a line from input, converts it to a string (stripping a trailing newline), and returns that.

raw_input() does not take anything after the newline/linebreak.

Jeremy
  • 1,894
  • 2
  • 13
  • 22