Datascienceera

Learning by Examples

With our “Try it Yourself” editor, you can edit Python code and view the result.

Example

 print("Hello, World!") 

Click on the “Try it Yourself” button to see how it works.

Python File Handling

In our File Handling section you will learn how to open, read, write, and delete files.

Python File Handling

Python Database Handling

In our database section you will learn how to access and work with MySQL and MongoDB databases:

Python MySQL Tutorial

Python MongoDB Tutorial

Python Exercises

Test Yourself With Exercises

 print("Hello, World!") 
import re

#Check if the string starts with "The" and ends with "Spain":

txt = "The rain in Spain"
x = re.search("^The.*Spain$", txt)

if x:
  print("YES! We have a match!")
else:
  print("No match")

Leave a Reply

Your email address will not be published. Required fields are marked *