Negation

FIND A SOLUTION AT Academic Writers Bay

1 Assume that the variable data refers to the list [5, 3, 7]. Write the values of the following expressions:
a data[2]
b data[-1]
c len(data)
d data[0:2]
e 0 in data
f data + [2, 10, 5]
g tuple(data)
2 Assume that the variable data refers to the list [5, 3, 7]. Write the expressions that perform the following tasks:
a Replace the value at position 0 in data with that value’s negation.
b Add the value 10 to the end of data.
c Insert the value 22 at position 2 in data.
d Remove the value at position 1 in data.
e Add the values in the list newData to the end of data.
f Locate the index of the value 7 in data, safely.
g Sort the values in data.

YOU MAY ALSO READ ...  ECONOMICS AND QUANTITATIVE ANALYSIS
Order from Academic Writers Bay
Best Custom Essay Writing Services

QUALITY: 100% ORIGINAL PAPERNO PLAGIARISM – CUSTOM PAPER