Sort by

recency

|

84 Discussions

|

  • + 0 comments

    I solved this problem using a Bash script (cut -c 13-), and now I’m trying to run it in Python 3, but test case 1 keeps failing. Has anyone else tried this and succeeded? Here’s my code: :- import sys

    for line in sys.stdin:

    # remove newline so we control line breaks
    line = line.rstrip("\n")
    
    if len(line) < 13:
        # If line has fewer than 13 chars, print a blank line
        print()
    else:
        # Print from the 13th character onward
        print(line[12:])
    
  • + 0 comments
    cut -c13-
    
  • + 0 comments

    Simply writing "cut -c13-" will solve everything

  • + 0 comments

    for(( N=1;N<=100;N++ )) do read line echo "$line" | cut -c13- done

  • + 0 comments

    for(( N=1;N<=100;N++ )) do read line echo "$line" | cut -c13- done