<jupyter_start><jupyter_text>Lists Creating Portfolio of Stock List<jupyter_code>portfolio_ticker_list = ['FB','AAPL','PG','AMZN', 'MSFT', 'TSLA', 'JNJ', 'GOOG', 'GOOGL', 'JPM','WMAT','PYPL']
portfolio_ticker_list<jupyter_output><empty_output><jupyter_text>Accessing Element in a List:<jupyter_code>portfolio_ticker_list[2]
portfolio_ticker_list[3]
portfolio_ticker_list[7]
portfolio_ticker_list[-1]
portfolio_ticker_list[-2]
portfolio_ticker_list[15]<jupyter_output><empty_output><jupyter_text>List of Mix Data Types<jupyter_code>mix_data_types = [2, 4.4, 'artificial intelligence using python', True]
mix_data_types[1]
mix_data_types[2]
mix_data_types[3]<jupyter_output><empty_output><jupyter_text>Slice and Dice with Lists<jupyter_code>First_five_stocks = portfolio_ticker_list[ 0  :  5 ]
print(First_five_stocks)<jupyter_output><empty_output><jupyter_text>Short cut way of slicing<jupyter_code>First_five_stocks = portfolio_ticker_list[ : 5]
print(First_five_stocks)
Last_three_stocks = portfolio_ticker_list[ 9 : ]
print(Last_three_stocks)
Last_three_stocks = portfolio_ticker_list[ -3 : ]
print(Last_three_stocks)
Last_five_stocks =portfolio_ticker_list[-5:]
print(Last_five_stocks)<jupyter_output><empty_output><jupyter_text>List MethodsAdding Pfizer symbol "PFE" in the portfolio list<jupyter_code>portfolio_ticker_list.append("PFE")
portfolio_ticker_list
portfolio_ticker_list.insert(0, "PEP")
portfolio_ticker_list<jupyter_output><empty_output><jupyter_text>Functions that can be used with lists<jupyter_code>len(portfolio_ticker_list)
min(portfolio_ticker_list)
max(portfolio_ticker_list)
sorted(portfolio_ticker_list)
'JNJ' in portfolio_ticker_list
'JNJ' not in portfolio_ticker_list<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10608695652173913, 'fraction_numerical': 0.011594202898550725, 'mean_word_length': 14.274336283185841, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '567160', 'license': 'MIT', 'n_tokens_mistral': 694, 'n_tokens_neox': 681, 'n_words': 91, 'path': '10_List.ipynb', 'repo_name': 'Rizwan-Ahmed-Surhio/Accountants', 'size': '1725'}