Skip to content

learndataa

Imagine data to solve problems

  • Home
  • YouTube Courses
  • Udemy Courses
  • Training
  • About
  • Privacy Policy
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
  • Home
  • YouTube Courses
  • Udemy Courses
  • Training
  • About
  • Privacy Policy
  • Facebook
  • Twitter
  • Instagram
  • Pinterest

Function

21 August 2020

Code

# Define a function
def find_panda_in_zoo(x):
    y = 'panda' in x
    if (y==True):
        return "Panda is in the zoo!"
    else:
        return "No Panda!"
    
# Create a list
zoo = ['monkey', 'lion', 'elephant', 'panda']

# Call function
find_panda_in_zoo(zoo)
'Panda is in the zoo!'






Any errors in code above?
Please send a message.

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Home
  • YouTube Courses
  • Udemy Courses
  • Training
  • About
  • Privacy Policy
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
learndataa, Website Powered by WordPress.com.
  • Subscribe Subscribed
    learndataa

    Have a WordPress.com account? Log in now.

  • learndataa
    Copy shortlinkView post in Reader
    Manage subscriptionsSign upLog in
    Report this content
    Collapse this bar