These technologies are the future of computer science. This returns how much 1 USD equals in other currencies.ĭS and ML are the most trendy topics these days. Ratelist = soup.findAll("table", ).findAll("tbody") Soup = BeautifulSoup(r.content, 'html.parser') Let’s use scraping in python to fetch currency values – import requests Let me show you an example on how you can scrape currency values from a website – Example – Get currency value compared to USD Data on the web is unstructured, and python provides an easy way to parse and consume this data and even do further analysis and operations. Think how cool it would be if you can access that data easily that is what web scraping is, and python makes it even easier with its amazing support and libraries. You see a lot of data every day across multiple sites. Print "You have", + turns, ' turns left!' Guess = raw_input("Guess a character or enter the correct word: ") Print "Hello, Let's play hangman! You will have " + str(turns) + " turns!" Code can be shortened a lot, and I’ll leave that as an exercise to you! # hangman.py Here is a simple python program which lets you play hangman game in the terminal. You can even make cross-platform games using Kivy, which runs on Windows, Mac, Linux, Android, and iOS. It supports art, music, sound, video, and multimedia projects to be built with it. Replace with your filename.csv, and you will get a JSON output! Try it now – python -c "import csv,json print json.dumps(list(csv.reader(open('your_csv_file.csv'))))" You can convert the CSV file to JSON with just 1 command in python! Some awesome scripts and packages you can start using – From setting cron jobs and reminders to downloading your favorite youtube videos, you can do it all with a couple of lines in python. There are a ton of things that you can automate with as little as 4-5 lines of code. If you are an engineer, you probably will be lazy and want to automate almost everything you can, right? You’ll see current directory □ Automation and Scripting Suppose your IP is – 192.168.43.155 and you use the default port. Check your local IP (should start with 192.168….) Go to the desired directory that you want to access and run the following command – # python version >= 3.XĬheck your IP by running – ifconfig. You can access your file system by running a file server on your machine. Some resources to get started with web development in Python –Įxample – Access to the computer file system from mobile If you want something minimal to start with – I’ll recommend Flask!Īpart from these, Python has a large number of libraries for web development. These frameworks provide a package where you have a defined structure, supports database interactions with ease all this is set up with a minimal setup command. Python is not used directly in browsers.ĭjango is one of the most popular web frameworks in python. Generally, developers use JavaScript in frontend and python for supporting server-side operations. It can be used to build server-side web applications and can be integrated with any frontend. Python has very good support for web development with its frameworks like Django, Flask, and others. In case you don’t know python, I’ll recommend learning it! In this article, I’ll try to cover multiple domains with examples and show you some of the fun stuff you can do with Python. Web Development with frameworks like Django and Flask.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |