BEGINNER PYTHON CODING - REVERSE WORDS IN A STRING
This is a beginner python coding exercise. Reverse words in a string!
💻 Code along with a Python 3 online compiler: https://www.onlinegdb.com/online_python_compiler
⭐ SUBSCRIBE to Apptato for more Brain Teasers, Code Challenges and interesting math problems!
💻 Problem taken from geeksforgeeks.org
Question:
Reverse Words in a given String
For example:
- 1 2 3 4 5 -- 5 4 3 2 1
- Reverse a String in Python 3 -- 3 Python in String a Reverse
Coverage & Review:
Array Split
Array Join
Array For Loop
Answer:
Code:
string = "5 4 3 2 1"
def reverseString(s):
wordArray = s.split(' ')
output = []
for word in wordArray:
output.insert(0,word)
return " ".join(output)
print(reverseString(string))
Thanks for watching
Until next time!
*** LINKS ***
Website: http://www.apptato.com
YouTube: https://www.youtube.com/apptato
Twitter: https://www.twitter.com/apptato
Facebook: https://www.facebook.com/apptato
Instagram: https://www.instagram.com/apptato
#CODE #PYTHON #PROGRAMMING
Видео BEGINNER PYTHON CODING - REVERSE WORDS IN A STRING канала Apptato Trivia & Word Games
💻 Code along with a Python 3 online compiler: https://www.onlinegdb.com/online_python_compiler
⭐ SUBSCRIBE to Apptato for more Brain Teasers, Code Challenges and interesting math problems!
💻 Problem taken from geeksforgeeks.org
Question:
Reverse Words in a given String
For example:
- 1 2 3 4 5 -- 5 4 3 2 1
- Reverse a String in Python 3 -- 3 Python in String a Reverse
Coverage & Review:
Array Split
Array Join
Array For Loop
Answer:
Code:
string = "5 4 3 2 1"
def reverseString(s):
wordArray = s.split(' ')
output = []
for word in wordArray:
output.insert(0,word)
return " ".join(output)
print(reverseString(string))
Thanks for watching
Until next time!
*** LINKS ***
Website: http://www.apptato.com
YouTube: https://www.youtube.com/apptato
Twitter: https://www.twitter.com/apptato
Facebook: https://www.facebook.com/apptato
Instagram: https://www.instagram.com/apptato
#CODE #PYTHON #PROGRAMMING
Видео BEGINNER PYTHON CODING - REVERSE WORDS IN A STRING канала Apptato Trivia & Word Games
Показать
Комментарии отсутствуют
Информация о видео
26 июля 2019 г. 22:00:05
00:07:44
Другие видео канала
![10 Canada Interesting Facts | Learn Something New About Canadian History and Culture Trivia](https://i.ytimg.com/vi/NalkmVBFN_Y/default.jpg)
![IQ TEST QUESTIONS AND ANSWERS #1 - Test your Brain with these 5 Challenging Problems](https://i.ytimg.com/vi/9N6lAKTl7o8/default.jpg)
![CROSSWORD PUZZLE SHORTS #2 - GENERAL KNOWLEDGE TRIVIA QUIZ (7 QUESTIONS AND ANSWERS)](https://i.ytimg.com/vi/PmhrVjQb8Ak/default.jpg)
![MENTAL MATHS QUIZ #5 - 1 MINUTE ADDITION SUBTRACTION DIVISION MULTIPLICATION MATH SPEED TEST #SHORTS](https://i.ytimg.com/vi/zO9tlLRJEWk/default.jpg)
![Stroop Effect Test (Many Can't Do This Test!)](https://i.ytimg.com/vi/bgBHQgt7DJc/default.jpg)
![MEMORY TEST GAME #6 | Memorize 3 Pictures & Answer 5 Questions | Brain Training Memory Test Games](https://i.ytimg.com/vi/aGUxbir-3sQ/default.jpg)
![MAZE GAMES #1 - Solve the 10 Halloween Trick or Treat Mazes | Family & Friends Game Night](https://i.ytimg.com/vi/y__4lEe0xnk/default.jpg)
![Baseball Math Problem | Algebra for Beginners | Interesting Math Problems for All Ages](https://i.ytimg.com/vi/mp59Q9mORp8/default.jpg)
![ANIMAL MATH QUIZ - 5 Challenging Animal Math Test Questions and Answers](https://i.ytimg.com/vi/Xjg2aFzSu1w/default.jpg)
![INDIA TRIVIA QUIZ - 30 Indian General Knowledge Questions and Answers Pub Quiz](https://i.ytimg.com/vi/hOh5OE87-TA/default.jpg)
![Crossword Puzzles with Answers #7 (15 Comic Book Trivia Quiz Questions) | Word Games to Play](https://i.ytimg.com/vi/DPmU2lCXlZ0/default.jpg)
![MATH NUMBER SERIES PUZZLE #3 - WHAT NUMBER IS NEXT? (MATH SERIES) #SHORTS](https://i.ytimg.com/vi/EMDfWiwqhx8/default.jpg)
![GENERAL KNOWLEDGE TRIVIA QUIZ #4 | 10 General Knowledge Trivia Questions and Answers | Pub Quiz](https://i.ytimg.com/vi/aiTGfpW3D4o/default.jpg)
![Singapore Trivia Questions and Answers (15 Interesting Singaporean Facts) | General Knowledge Quiz](https://i.ytimg.com/vi/c_9EzRIbKNI/default.jpg)
![Find the Difference #4 (3 Christmas Pictures) | Spot the Odd Differences Out on Christmas Eve / Day](https://i.ytimg.com/vi/kI2NsFI3fTo/default.jpg)
![MENTAL MATHS QUIZ #6 - 1 MINUTE ADDITION SUBTRACTION DIVISION MULTIPLICATION MATH SPEED TEST #SHORTS](https://i.ytimg.com/vi/w68sZc-vfyc/default.jpg)
![Find the Difference #3 | Spot the Odd Differences Out | Family Game Night](https://i.ytimg.com/vi/prmd4rLm_cU/default.jpg)
![GENERAL KNOWLEDGE TRIVIA QUIZ #5 | 10 General Knowledge Trivia Questions and Answers | Pub Quiz](https://i.ytimg.com/vi/JdtxfZRrh3g/default.jpg)
![What's the Missing Number and Why? | Interesting Math Problems for All Ages](https://i.ytimg.com/vi/Z2_RSyeKGmU/default.jpg)
![Hong Kong Parking Spot Riddle (Are you Smarter than a Hong Kong Grade School Student?)](https://i.ytimg.com/vi/I-CyjP2vR8o/default.jpg)
![Super Mario Trivia Quiz - Test Your Nintendo General Knowledge Trivia](https://i.ytimg.com/vi/i7PTpoh_Yjs/default.jpg)