Question: Assuming that 

```
outputTemp =

  2×1 cell array

    {122×1 string}
    {220×1 string}

```

`finalOutput` is a string array (`342x1 string`).

is there any way to do the following

```
outputTemp = arrayfun(@(x)someFunc(x), someInput, 'UniformOutput', false)';
finalOutput= [outputTemp{1}; outputTemp{2}];

```

in one line?

for the minimal example, `someFunc` can be a function that provides the names of the files in folders provided in `someInput`.

Answer: 
you can parse the `requirements.txt` file with python itself and get your package names and split it manually like below:

```
with open("requirements.txt") as myFile:
  pkgs = myFile.read()
  pkgs = pkgs.splitlines()

  for pkg in pkgs:
      print(pkg.split('==')[0])

```

this will give you something like below:

[![enter image description here](https://i.stack.imgur.com/hQHf4.jpg)](https://i.stack.imgur.com/hQHf4.jpg)
You need to change the `requirement.txt` file to remove all the version dependencies. you can parse the file for that. Or use regex.

`==\w+.+.+`

This will select all the element after symbol == including the symbol.

Replace with null empty string.

Open the requirements.txt in some editor that support regex (for example vs code).

Then use find and replace. (ctrl + f in vs code)

choose regex option. (click on `.*` in find and replace context menu in vs code)

in find put `==\w+.+.+`
in replace put nothing. (keep it empty)

then replace all.

Then `pip install requirements.txt` and you are good to go.