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

  • SEARCH
  • Home
  • 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 6605457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:17:11+00:00 2026-05-25T19:17:11+00:00

I want to display a string which is return ed by a function in

  • 0

I want to display a string which is returned by a function in a Python script, without using print:

def myfunc(mystring):
    return "Converting to lowercase :{0}".format(mystring.lower())

result=myfunc("LOWER")
result

But it doesn’t give an output. How can I get result to display without print?

  • 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-25T19:17:12+00:00Added an answer on May 25, 2026 at 7:17 pm

    Your code does print 'Converting to lowercase :lower' when run in an interactive session (using python or ipython).

    It does not, however, print anything if run as part of a script, since there is no implicit printing of expression results.

    This is how it’s meant to be.

    If you want to print something from a script, use print or sys.stdout.write().

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

Sidebar

Related Questions

I am using PHP, i want to display a string which comes as title
I have a string which has been sent using udp. Now I want to
I want to display a lengthy rotated string in the background of one of
I have two possible widths for a string i want to display in a
i want to display some information in a listview using the GridView. i have
I would like to create a function which validates a date string. My module
I have an AJAX request (using JQuery) that calls a PHP script which does
I am using rdlc report, i have a column in database which i want
I want to create a function using cURL and the bit.ly API to shorten
I want to format a date object so that I can display strings such

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.