What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-14 10:51:09
Give at least three examples that show different features of string slices. Describe the feature illustrated by each example. Invent your own examples. Do not copy them for the textbook or any other source.
print('Example 1: Substrings and every i-th character') string = 'Describe the feature illustrated by each example.' strA = string[0:9] strB = string[9::2] strC = string[10::2] listD = [x + y for x, y in zip(strB, strC)] string2 = strA + ''.join(lis... Add solution -
Python 2021-10-17 23:02:04
program for tic tac toe in python
board = ['-', '-', '-', '-', '-', '-', '-', '-', '-'] gameplay = [1, 0, 1, 0, 1, 0, 1, 0, 1] def display_board(): print(board[0] + '|' + board[1] + '|' + board[2]) print(board[3] + '|' + board[4] + '|' + board[5]) print(board... Add solution