Mutations We have seen that lists are mutable (they can be changed), and tuples are immutable (they cannot be changed). Let's try to understand this with an example. You are given an immutable string, and you want to make changes to it. Example >>> string = "abracadabra" You can access an index by: >>> print string[5] a What if you would like to assign a value? >>> string[5] = 'k' Traceback (mos..
What's Your Name? You are given the firstname and lastname of a person on two different lines. Your task is to read them and print the following: Hello firstname lastname! You just delved into python. Function Description Complete the print_full_name function in the editor below. print_full_name has the following parameters: string first: the first name string last: the last name Prints string: ..
String Split and Join In Python, a string can be split on a delimiter. Example: >>> a = "this is a string" >>> a = a.split(" ") # a is converted to a list of strings. >>> print a ['this', 'is', 'a', 'string'] Joining a string is simple: >>> a = "-".join(a) >>> print a this-is-a-string Task You are given a string. Split the string on a " " (space) delimiter and join using a - hyphen. Function Des..
sWAP cASE You are given a string and your task is to swap cases. In other words, convert all lowercase letters to uppercase letters and vice versa. For Example: Www.HackerRank.com → wWW.hACKERrANK.COM Pythonist 2 → pYTHONIST 2 Function Description Complete the swap_case function in the editor below. swap_case has the following parameters: string s: the string to modify Returns string: the modifi..
- Total
- Today
- Yesterday
- mysql
- hackerrank
- 해커랭크
- 경구치료제
- Weather Observation Station
- Tableau
- insert
- 넥스트BT
- 에코캡
- HK이노엔
- python
- python3
- 매매일지
- 동국알앤에스
- SQL Server
- 분석탭
- 몰누피라비르
- DATABASE
- 리비안
- TSQL
- string
- 테슬라
- MS SQL Server
- 코로나19
- MSSQL
- 대원화성
- tensorflow
- list
- 넷플릭스
- 미중무역전쟁
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |