Advertisement
karolinagergert

Untitled

Jul 3rd, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. x = str('информатика') # Пункт 1
  3. word1 = x[2:7]
  4. word2 = x[7:10]
  5. print(word1, word2)
  6.  
  7. c = str('муха') # Пункт 2
  8. print(c.replace('муха', 'слон'))
  9.  
  10. b = str('вебинариум') # Пункт 3
  11. B = (b[5:7])
  12. B = B[::-1]
  13. print(b[-2]) and (b[0:2] + B)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement