Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7088925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:51:37+00:00 2026-05-28T07:51:37+00:00

I know this sounds like something I can google, but the truth is that

  • 0

I know this sounds like something I can google, but the truth is that I don’t find or do not understand what the very few Python 3 sources explains.

So here are my questions:

  • Is input() the stdin function in Python 3? Does that mean that when you open your filename.py program, the stdin is what the user types?
  • Is print() the stdout function in Python 3, or do you have to write to a file?
  • For the Spotify puzzle, is says “Input is read from stdin”. What should my file include of stdin and stdout?

Update:
Does that mean that i can use:

import sys
unfmtdDate = str(sys.stdin.read())

…instead of…

unfmtdDate = str(input())

?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:51:38+00:00Added an answer on May 28, 2026 at 7:51 am

    stdin and stdout are file-like objects provided by the OS. In general, when a program is run in an interactive session, stdin is keyboard input and stdout is the user’s tty, but the shell can be used to redirect them from normal files or piped output from and input to other programs.

    input() is used to prompt the user for typed input. In the case of something like a programming puzzle, it’s normally assumed that stdin is redirected from a data file, and when the input format is given it’s usually best to use sys.stdin.read() rather than prompting for input with input(). input() is intended for interactive user input, it can display a prompt (on sys.stdout) and use the GNU readline library (if present) to allow line editing, etc.

    print() is, indeed, the most common way of writing to stdout. There’s no need to do anything special to specify the output stream. print() writes to sys.stdout if no alternate file is given to it as a file= parameter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't know if this is possible but it sounds like something that should
Ok I know this practically sounds elementary, but I don't understand what I'm not
I know this sounds like a really obvious question, but it's proving harder to
I know this sounds like a homework assignment, but it isn't. Lately I've been
I know this sounds easy but how can i delete a image with wxpython?
This sounds like a trivia question but I really need to know. If you
I know the question sounds silly, but consider this: I have an array of
Sorry if this sounds like a newbie question, but the other day a Java
I know this sounds strange, mixing CDI (Weld) and Spring for the controller. But
Sounds simple enough, but its not working. In this example, I want to set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.