store stock price in varible for different stocks in python

So i am running the below code as an example to get OHLC data for stocks that stock OHLC data as global

high = NULL
low = NULL
open = NULL
close = NULL

def get_stock_data(symbol):
    data = getdata.symbol

my issue is every time i run that function to get different stocks OHLC data the previous data is remove example if i want to get OHLC data for TSLA and GOOGL using the function only GOOGL OHLC data is recorded


is there a way to store OHLC data for different stocks without losing the previous stock OHLC data

PdfBox cannot read all fields

So I am trying to access fields from a pdf , when I get the fields. I am only getting one field , I have tried with iterating tree , but it just returns one field.I tried analyzing pdf through online pdf tools . but why i am getting just one field? this is what i am getting topmostSubform[0].Page1[0].Table_Line1[0].Row1[0].f1_3[0] Below is code

 File file = new File("/Users/inderjeet/crptmrepos/CryptoTaxService/src/main/resources/tax-forms/f8949.pdf");
    PDDocument doc = PDDocument.load(file);
    PDDocumentCatalog docCatalog = doc.getDocumentCatalog();
    PDAcroForm  acroForm = docCatalog.getAcroForm();
    PDFieldTree fieldTree = acroForm.getFieldTree();
    Iterator<PDField> fieldTreeIterator = fieldTree.iterator();
    while (fieldTreeIterator.hasNext()) {
        PDField field =;
        if (field instanceof PDTerminalField) {
            String fullyQualifiedName = field.getFullyQualifiedName();
            System.out.println("Field name "+fullyQualifiedName);

I have tried everything (getFieldTree method , iterating over this tree) , i also tried other library like itext. still i can only get one field.